﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Runtime.Serialization;

namespace MinistryStandardPlatformWeb.Models
{
    [DataContract]
    public class UserＭodel
    {
        [DataMember]
        public string UserId { get; set; }

        [DataMember]
        public string UnitId { get; set; }

        [DataMember]
        public string UnitName { get; set; }

        [DataMember]
        public List<string> MenuRights { get; set; }

        public override string ToString()
        {
            return CommonFunctions.ObjectToJsonStr(this);
        }

        public bool HasMenuRight(string menuId)
        {
            return MenuRights.Contains(menuId);
        }
    }
}